/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * DErrorDisplay.java
 *
 * Created on 13/12/2010, 03:38:52
 */

package tm.gui;

/**
 *
 * @author araruna
 */
public class DErrorDisplay extends javax.swing.JDialog {

	private static final long serialVersionUID = 6981740282997186664L;
	/** Creates new form DErrorDisplay */
    public DErrorDisplay(java.awt.Frame parent, boolean modal) {
        super(parent, modal);
        initComponents();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jLabelTitle = new javax.swing.JLabel();
        jScrollPane = new javax.swing.JScrollPane();
        jTableLog = new javax.swing.JTable();
        jLabelShow = new javax.swing.JLabel();
        jButtonClose = new javax.swing.JButton();
        jCheckBoxErr = new javax.swing.JCheckBox();
        jCheckBoxWarn = new javax.swing.JCheckBox();
        jCheckBoxInfo = new javax.swing.JCheckBox();

        org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(tm.WMain.class).getContext().getResourceMap(DErrorDisplay.class);
        setTitle(resourceMap.getString("Form.title")); // NOI18N
        setName("Form"); // NOI18N

        jLabelTitle.setText(resourceMap.getString("jLabelTitle.text")); // NOI18N
        jLabelTitle.setName("jLabelTitle"); // NOI18N

        jScrollPane.setName("jScrollPane"); // NOI18N

        jTableLog.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {
                "Time", "Type", "Message"
            }
        ) {
            Class[] types = new Class [] {
                java.lang.String.class, java.lang.String.class, java.lang.String.class
            };
            boolean[] canEdit = new boolean [] {
                false, false, false
            };

            public Class getColumnClass(int columnIndex) {
                return types [columnIndex];
            }

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        jTableLog.setAutoResizeMode(javax.swing.JTable.AUTO_RESIZE_LAST_COLUMN);
        jTableLog.setName("jTableLog"); // NOI18N
        jTableLog.getTableHeader().setReorderingAllowed(false);
        jScrollPane.setViewportView(jTableLog);
        jTableLog.getColumnModel().getColumn(0).setHeaderValue(resourceMap.getString("jTableLog.columnModel.title0")); // NOI18N
        jTableLog.getColumnModel().getColumn(1).setHeaderValue(resourceMap.getString("jTableLog.columnModel.title1")); // NOI18N
        jTableLog.getColumnModel().getColumn(2).setHeaderValue(resourceMap.getString("jTableLog.columnModel.title2")); // NOI18N

        jLabelShow.setText(resourceMap.getString("jLabelShow.text")); // NOI18N
        jLabelShow.setName("jLabelShow"); // NOI18N

        jButtonClose.setText(resourceMap.getString("jButtonClose.text")); // NOI18N
        jButtonClose.setName("jButtonClose"); // NOI18N

        jCheckBoxErr.setText(resourceMap.getString("jCheckBoxErr.text")); // NOI18N
        jCheckBoxErr.setName("jCheckBoxErr"); // NOI18N

        jCheckBoxWarn.setText(resourceMap.getString("jCheckBoxWarn.text")); // NOI18N
        jCheckBoxWarn.setName("jCheckBoxWarn"); // NOI18N

        jCheckBoxInfo.setText(resourceMap.getString("jCheckBoxInfo.text")); // NOI18N
        jCheckBoxInfo.setName("jCheckBoxInfo"); // NOI18N

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 575, Short.MAX_VALUE)
                    .addComponent(jLabelTitle, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(jLabelShow)
                        .addGap(18, 18, 18)
                        .addComponent(jCheckBoxErr)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jCheckBoxWarn)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jCheckBoxInfo))
                    .addComponent(jButtonClose, javax.swing.GroupLayout.Alignment.TRAILING))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addComponent(jLabelTitle, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 225, Short.MAX_VALUE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabelShow)
                    .addComponent(jCheckBoxErr)
                    .addComponent(jCheckBoxWarn)
                    .addComponent(jCheckBoxInfo))
                .addGap(5, 5, 5)
                .addComponent(jButtonClose)
                .addContainerGap())
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    /**
    * @param args the command line arguments
    */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                DErrorDisplay dialog = new DErrorDisplay(new javax.swing.JFrame(), true);
                dialog.addWindowListener(new java.awt.event.WindowAdapter() {
                    public void windowClosing(java.awt.event.WindowEvent e) {
                        System.exit(0);
                    }
                });
                dialog.setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton jButtonClose;
    private javax.swing.JCheckBox jCheckBoxErr;
    private javax.swing.JCheckBox jCheckBoxInfo;
    private javax.swing.JCheckBox jCheckBoxWarn;
    private javax.swing.JLabel jLabelShow;
    private javax.swing.JLabel jLabelTitle;
    private javax.swing.JScrollPane jScrollPane;
    private javax.swing.JTable jTableLog;
    // End of variables declaration//GEN-END:variables

}
